Math Blocks in Typst

Tài liệu

Math Block Features

Syntax Options

Typst offers both inline math using single $ delimiters and block math using double $$ delimiters for more complex equations and formulas.

Mathematical Elements

Math blocks support:

  • Common mathematical operators
  • Greek letters and symbols
  • Fractions and integrals
  • Matrices and arrays
  • Subscripts and superscripts
  • Multi-line equations

Examples

Complex math block:

VD1

Input


integral_0^infinity frac(x^3, e^x - 1) dif x
= frac(pi^4, 15)

Output

0𝑥3𝑒𝑥1d𝑥=𝜋415

VD2

Input

vec(a/b, a/b, a/b) = vec(1, 1, 1)

Output

((((𝑎𝑏𝑎𝑏𝑎𝑏))))=((((111))))

Common Math Notation

Math blocks automatically handle:

  • Proper spacing around operators
  • Multi-character variable names
  • Alignment in multi-line equations
  • Equation numbering
  • Cross-referencing

Typst's math blocks combine LaTeX-like mathematical capabilities with a more intuitive and modern syntax.

$2^2=4$